<template>
  <div class="home">
    <div class="home_container">
      <keep-alive :exclude="['ArticleDetail', 'Login', 'Search', 'SearchResult']">
        <router-view></router-view>
      </keep-alive>
    </div>
    <van-tabbar v-model="active" active-color="#d43c33" inactive-color="#000">
      <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
      <van-tabbar-item icon="service-o" to="/chat">小冰</van-tabbar-item>
      <van-tabbar-item icon="contact" to="/user">个人中心</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: "HomeView",
  components: {},
  data() {
    return {
      // active: 0,
    };
  },
  created() {
    // this.active = this.$route.meta.active;
  },
  computed: {
    active: {
      get() {
        return this.$route.meta.active
      },
      set(value) {
        return value
      }
    }
  }
};
</script>
<style lang="less" scoped>
.home {
  width: 100%;
  height: 100%;

  .home_container {
    width: 100%;
    height: 100%;
    // padding-bottom: 50px;
  }
}
</style>
